using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace EasyNetWork
{
    public class HeartBeatState
    {
        private float m_HeartBeatElapseSeconds; //心跳时间
        private int m_MissHeartBeatCount; //丢失的心跳包数量
        
        
        public HeartBeatState()
        {
            m_HeartBeatElapseSeconds = 0f;
            m_MissHeartBeatCount = 0;
        }
        
        public float HeartBeatElapseSeconds
        {
            get
            {
                return m_HeartBeatElapseSeconds;
            }
            set
            {
                m_HeartBeatElapseSeconds = value;
            }
        }
        
        public int MissHeartBeatCount
        {
            get
            {
                return m_MissHeartBeatCount;
            }
            set
            {
                m_MissHeartBeatCount = value;
            }
        }
        
        public void Reset(bool resetHeartBeatElapseSeconds)
        {
            if (resetHeartBeatElapseSeconds)
            {
                m_HeartBeatElapseSeconds = 0f;
            }

            m_MissHeartBeatCount = 0;
        }
    }

}
